package com.weetop.cfw.mine.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.coorchice.library.SuperTextView
import com.weetop.cfw.R
import com.weetop.cfw.bean.AudioVideoBrowsingRecordBean
import com.weetop.cfw.bean.RecommendAudioVideoBean
import com.weetop.cfw.bean.TestBean
import com.weetop.cfw.constants.UrlConstants

class AudioDetailAdapter(layoutId:Int,dataList:List<RecommendAudioVideoBean.DataBean>):BaseQuickAdapter<RecommendAudioVideoBean.DataBean,BaseViewHolder>(layoutId,dataList) {

    override fun convert(helper: BaseViewHolder, item: RecommendAudioVideoBean.DataBean?) {
        val textMyCoursesImg = helper.getView<SuperTextView>(R.id.textMyCoursesImg)
        val textSmallImage = helper.getView<SuperTextView>(R.id.textSmallImage)
        textMyCoursesImg.setUrlImage("${UrlConstants.baseUrl}${item?.imgurl}")
        textSmallImage?.setUrlImage("${UrlConstants.baseUrl}${item?.imgurl}")
        helper.setText(R.id.textCourseName,item?.title).setText(R.id.textCourseTeacherName,item?.author).setText(
            R.id.textCoursePlayNumber,item?.playnum)
    }

}